<template>
 <div>
  <div class="recommend-title">热销推荐</div>
  <ul class="items">
    <router-link tag="li" :to="'/detail/'+item.id" class="item border-bottom" v-for="item of recommendList" :key="item.id" >
      <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" />
      </div>
      <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
          <button class="item-button">查看详情</button>
      </div>
    </router-link>
  </ul>
 </div>
</template>
<script>
export default{
  props: ['recommendList'],
  name: 'HomeRecommend'
}
</script>
<style lang="stylus" scoped>
  .recommend-title
    margin-top: .2rem
    line-height: .8rem
    background: #eee
    text-indent: .2rem
  .items
    margin-left:.24rem
    .item
      padding:.2rem 0
      display:flex
      .item-img-wrapper
        width:2rem
        height:2rem
        .item-img
          width:100%
          height:100%
      .item-info
        flex:1
        padding-left:.22rem
      .item-title
        font-size:.32rem
        margin-top:.26rem
      .item-desc
        font-size:.24rem
        margin-top:.14rem
      .item-button
        margin-top:.22rem
        background:yellow
        border:.02rem solid gray
        border-radius:.05rem
        font-size:.24rem
        padding:.1rem
</style>
